home *** CD-ROM | disk | FTP | other *** search
/ The Charlie Rose Science Series Anthology / The Charlie Rose Science Series Anthology (Pfizer, Inc.)(2008).iso / mac / Charlie Rose Science Series Anthology.app / Contents / Resources / movie.swf / scripts / __Packages / mx / skins / halo / ActivatorSkin.as next >
Text File  |  2008-02-01  |  2KB  |  53 lines

  1. class mx.skins.halo.ActivatorSkin extends mx.skins.RectBorder
  2. {
  3.    static var symbolName = "ActivatorSkin";
  4.    static var symbolOwner = mx.skins.halo.ActivatorSkin;
  5.    var className = "ActivatorSkin";
  6.    var backgroundColorName = "buttonColor";
  7.    static var classConstructed = mx.skins.halo.ActivatorSkin.classConstruct();
  8.    static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
  9.    function ActivatorSkin()
  10.    {
  11.       super();
  12.    }
  13.    function init()
  14.    {
  15.       super.init();
  16.    }
  17.    function size()
  18.    {
  19.       this.drawHaloRect(this.__get__width(),this.__get__height());
  20.    }
  21.    function drawHaloRect(w, h)
  22.    {
  23.       var _loc5_ = this.getStyle("borderStyle");
  24.       var _loc4_ = this.getStyle("themeColor");
  25.       this.clear();
  26.       switch(_loc5_)
  27.       {
  28.          case "none":
  29.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,0,16777215,0);
  30.             break;
  31.          case "falsedown":
  32.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,0,9542041,100);
  33.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,0,[3355443,16579836],100,-90,"radial");
  34.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,0,_loc4_,50);
  35.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,0,16777215,100);
  36.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,0,_loc4_,20);
  37.             break;
  38.          case "falserollover":
  39.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,0,9542041,100);
  40.             this.drawRoundRect(this.__get__x(),this.__get__y(),w,h,0,_loc4_,50);
  41.             this.drawRoundRect(this.__get__x() + 1,this.__get__y() + 1,w - 2,h - 2,0,[3355443,16777215],100,0,"radial");
  42.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 3,w - 6,h - 6,0,16777215,100);
  43.             this.drawRoundRect(this.__get__x() + 3,this.__get__y() + 4,w - 6,h - 7,0,16316664,100);
  44.       }
  45.    }
  46.    static function classConstruct()
  47.    {
  48.       mx.core.ext.UIObjectExtensions.Extensions();
  49.       _global.skinRegistry.ActivatorSkin = true;
  50.       return true;
  51.    }
  52. }
  53.